mod image;
mod speech;
mod video;

use model_graph_types::container::workflow::{ImageGeneratorStatement, VideoGeneratorStatement};
use std::sync::{Arc, Mutex};

use model_graph_types::container::workflow::{
    SpeechGeneratorStatement, WorkflowBlockExecuteResult,
};

use crate::workflow::context::WorkflowContext;

pub async fn speech_execute(
    statement: &SpeechGeneratorStatement,
    context: Arc<Mutex<WorkflowContext>>,
) -> anyhow::Result<WorkflowBlockExecuteResult> {
    speech::execute(statement, context).await
}

pub async fn video_execute(
    statement: &VideoGeneratorStatement,
    context: Arc<Mutex<WorkflowContext>>,
) -> anyhow::Result<WorkflowBlockExecuteResult> {
    video::execute(statement, context).await
}

pub async fn image_execute(
    statement: &ImageGeneratorStatement,
    context: Arc<Mutex<WorkflowContext>>,
) -> anyhow::Result<WorkflowBlockExecuteResult> {
    image::execute(statement, context).await
}
